home *** CD-ROM | disk | FTP | other *** search
/ Practical Web Pages 2004 September / PracticalWebPages-WPG13-09-2004-Coverdisc.iso / pc / Software / Toolkit / Sothink SWF Quicker 1.5 / data1.cab / Public_Files / Effects / ActionScript / Scale / FadingShadow2.sqe < prev    next >
Encoding:
Text File  |  2004-06-14  |  2.2 KB  |  86 lines

  1. ========== Description Part Begin ==========
  2. name = "Fading shadow 2";
  3. description = "The shadow shows at a specified time and fade out in the end.";
  4. version = "1.00";
  5. bin = "FadingShadow2.bin";
  6. ========== Description Part End ==========
  7.  
  8. ========== Parameter Part Begin ==========
  9. $nCharacterCount(EDIT,INT,1,1 10000,"Total Characters ","The total characters using the special effect. The value is defined by the selected characters in the movie, but can not be changed in the property box.");
  10. $nFrameCount(EDIT,INT,3,3 3,"Total Frames","It indicates the total frames of actions. The total frames of the effect is probably more than it.");
  11. $nSize(EDIT,INT,100,1 1000,"Initial Shadow Size","A specified value; when the size of a character reaches the value, the shadow begins to show.");
  12. $nChangeSpeed(EDIT,INT,5,1 1000,"Shadow Speed","The speed of shadow fading.");
  13.  
  14. ========== Parameter Part End ==========
  15.  
  16. ========== Function Part Begin ==========
  17. nFrameCount = 10;
  18. nCharacterCount = 5;
  19. nSize = 50;
  20. nChangeSpeed = 5;
  21.  
  22.  
  23.  
  24. nChangeSize = 0;
  25. nGhostChangeSize = 0;
  26.     for (i = 1; i <= nCharacterCount; i++)
  27.     {
  28.         this["c" + i]._yscale = 0;
  29.         this["c" + i]._xscale = 0;
  30.         this["c" + i]._alpha = 0;
  31.     }
  32.  
  33.  
  34. function again()
  35. {
  36.     gotoAndPlay(2);
  37. }
  38.  
  39.  
  40. function fun()
  41. {    
  42.     if(nChangeSize > nSize)
  43.     {
  44.         CopyObject();
  45.         return ;        
  46.     }
  47.     
  48.     nChangeSize += nChangeSpeed;
  49.     for (i = 1; i <= nCharacterCount; i++)
  50.     {
  51.         this["c" + i]._yscale = nChangeSize;
  52.         this["c" + i]._xscale = nChangeSize;
  53.         this["c" + i]._alpha = nChangeSize;
  54.     }
  55.     
  56.     
  57. }
  58.  
  59.  
  60. function CopyObject()
  61. {
  62.     
  63.         for(i = nCharacterCount + 1;i <= nCharacterCount * 2;i++)
  64.         {
  65.             this["c" + (i - nCharacterCount)].duplicateMovieClip("c"+i, i);
  66.         }
  67.         for (i = nCharacterCount + 1; i <= nCharacterCount * 2; i++)
  68.         {
  69.             this["c" + i]._yscale +=  nGhostChangeSize;
  70.             this["c" + i]._xscale +=  nGhostChangeSize;
  71.             this["c" + i]._alpha -=  nGhostChangeSize;
  72.  
  73.         }
  74.         nGhostChangeSize += nChangeSpeed;
  75.     
  76.         if(this["c" + nCharacterCount *2]._alpha < 0)
  77.             gotoAndPlay(1);
  78. }
  79.  
  80. ========== Function Part End ==========
  81.  
  82. ========== Frame Part Begin ==========
  83. $frame(fun,1,-1,"fun");
  84. $frame(fun,2,-1,"fun");
  85. $frame(again,3,-1,"again");
  86. ========== Frame Part End ==========